﻿using System.Web.Http;
using Microsoft.ApplicationBlocks.Data;
using System.Configuration;
using System.Data;
using System.Net;
namespace CmdHost
{
    public class TestController : ApiController
    {
        private static string ConnString = ConfigurationManager.ConnectionStrings["ErpEntities"].ConnectionString;
        public DataTable GetPackageMaterial()
        {
            DataTable dt = SqlHelper.ExecuteDataset(ConnString, CommandType.Text, "select top 10 * from PackageMaterial").Tables[0];
            return dt;
        }

        // GET api/values/5 
        public string Get(int id)
        {
            return "value";
        }

        // POST api/values 
        public void Post([FromBody]string value)
        {
        }

        // PUT api/values/5 
        public void Put(int id, [FromBody]string value)
        {
        }

        // DELETE api/values/5 
        public void Delete(int id)
        {
        }
    }
}
